window.onload = function(){
    var img = document.getElementsByClassName('img')
    console.log(img);
    for(let i = 0;i<img.length;i++){
       img[i].onmouseenter =function(){
        img[i].style.transition = "all 0.6s"
        img[i].style.transform  = "rotate(30deg) "
       }
       img[i].onmouseleave =function(){
        img[i].style.transition = "all 0.6s"
        img[i].style.transform  = "rotate(0deg) "
       }
    }
}